package newx.com.control 
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import newx.com.loader.SwfLoader;
	
	/**
	 * ...
	 * @author WangHaiBo  www.woniu.com
	 */
	public class NxToolTipsPicPanel extends Sprite 
	{
		
		public function NxToolTipsPicPanel() 
		{
			var tempBack:Sprite	=	new Sprite()
			tempBack.graphics.beginFill(0x800000);
			tempBack.graphics.drawRect(0, 0, 10, 10);
			tempBack.graphics.endFill()
			tempBack.alpha	=	0
			this.addChild(tempBack);
		}
		public function setPic(url:String):void
		{
			if (url != "") 
			{
				var tempPic:NxClip	=	new NxClip();
				tempPic.x							=	150;
				tempPic.y							=	200;
				this.addChild(tempPic);
				SwfLoader.StartLoad(url,null,onComplete);
				function onComplete(val:DisplayObject, pList:Array):void
				{
					var mc:MovieClip	 			= new MovieClip();
					mc 								= (val as MovieClip);
					tempPic.source					=	mc;
				}
			}
			else
			{
				clearPic();
			}
		}
		public function clearPic():void
		{
			while (this.numChildren > 1) 
			{
				this.removeChildAt(1);
			}
		}
	}

}